package com.xxp.mapper;

import com.xxp.controller.request.TravelRequest;
import com.xxp.entity.Message;
import com.xxp.entity.Travel;
import com.xxp.entity.Tuijian;
import org.apache.ibatis.annotations.Mapper;

import java.util.List;

@Mapper
public interface TravelMapper {

    List<Travel> selectAll();

    List<Travel> listByCondition(TravelRequest travelRequest);

    Travel selectById(Integer id);


   List<Message> findMes(Integer id);

   List<Message> findAllMes();

   void pushMsg(Message message);

   void updateRecommend(Travel travel);

   void updateTravel(Travel travel);
    /*查询tuijian表里当前用户ID是否有给当前数据点过推荐*/
   List<Tuijian>  determine(Integer userId);

    /*点击推荐的时候往里面插入一条数据*/
   void insertdetermine(Tuijian tuijian);

   /*根据ID删除消息*/
    void deleteMsg(Integer id);

    void instertTravel(Travel travel);

    /*后台展示*/
    List<Travel> backSelect(TravelRequest travelRequest);

    void deleteTravel(Integer id);

   Travel TravelName(Integer id);

   List<Message> findAllMesByUser(Integer id);

}
